<script>
import * as echarts from 'echarts'
export default {
    name: 'ECharts',
    data() {
        return {
        items: []
        }
    },
    mounted() {
        this.initChart()
    },
    methods: {
        initChart() {
            var myChart = echarts.init(this.$refs.IndustryProportionRef)
            var option = {
                legend: {
                    top: 'center',
                    right: 'right',
                    padding: [0, 60, 0, 10],
                    textStyle: {
                        color: '#FFF',
                    },
                },
                series: [
                    {
                        label: {
                            show: true,
                            position: 'center'
                        },
                        labelLine: {
                            show: true
                        },
                        type: 'pie',
                        radius: [30, 130],
                        center: ['38%', '55%'],
                        roseType: 'area',
                        itemStyle: {
                            borderRadius: 8,
                        },
                        data: [
                            { value: 40, name: 'A111' },
                            { value: 44, name: 'A112' },
                            { value: 15, name: 'A113' },
                            { value: 23, name: 'A114' },
                            { value: 22, name: 'B113' },
                            { value: 18, name: 'B114' },
                            { value: 28, name: 'B115' },
                            { value: 11, name: 'C110' },
                            { value: 17, name: 'C112' },
                        ]
                    }
                ]
            };
            myChart.setOption(option)
        }
    }
}
</script>
<template>
    <div style="width: 100%; height: 100%;position: relative;">
        <div style="position: absolute;top: 20px;left: 20px;font-weight: 700;font-size: 18px;">行业占比</div>
        <div ref="IndustryProportionRef" style="width: 100%; height: 100%"></div>
    </div>
</template>